<style>
  .text-left {
    text-align: left !important;
  }
  .text-center {
    text-align: center !important;
  }
</style>
<form id="" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  {empty name="data"}
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <label class="control-label col-xs-12 col-sm-2 text-left">所选班级暂无课程</label>
  </div>
  {else /}
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <label class="control-label col-xs-12 col-sm-1"></label>
    <label class="control-label col-xs-12 col-sm-2 text-center">ID</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">课程</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">图片</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">价格</label>
  </div>
  {foreach name="data" item="grade"}
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{$grade.attr_group_name}</label>
  </div>
  {foreach name="$grade['class']" item="class"}
  {empty name="$class['goods']"}
  <label class="control-label col-xs-12 col-sm-7">所选班级暂无课程</label>
  {else /}
  {foreach name="$class['goods']" item="goods"}
  <div class="form-group">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <label class="control-label col-xs-12 col-sm-1">{$class.attr_name}</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">{$goods.id}</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">{$goods.name}</label>
    <label class="control-label col-xs-12 col-sm-2 text-center">
      <a href="{$goods.cover_pic}" data-url="{$goods.cover_pic}" target="_blank" class="thumbnail">
        <img src="{$goods.cover_pic}" onerror="this.src='/admin/ajax/icon?suffix=png';this.onerror=null;" class="img-responsive" width="50px">
      </a>
    </label>
    <label class="control-label col-xs-12 col-sm-2 text-center">{$goods.price}元</label>
  </div>
  {/foreach}
  {/empty}
  {/foreach}
  {/foreach}
  {/empty}

</form>
